package com.seqb.utils;

import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;

import javax.servlet.http.HttpServletRequest;

/**
 * @author lilinshen
 * @title HttpContext工具类
 * @description 请填写相关描述
 * @date 2019/11/11
 */
public class HttpContextUtils {

    /**
     * 获取request对象
     */
    public static HttpServletRequest getHttpServletRequest() {
        return ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
    }
}
